package com.yule.system.home;

import com.yule.system.dao.SystemCustomDao;
import com.yule.system.model.SystemRole;
import com.yule.system.model.SystemUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SystemCustomHome {

    @Autowired
    private SystemCustomDao systemCustomDao;

    public List<SystemRole> findRoleListByUserId(SystemUser user){
        return systemCustomDao.findRoleListByUserId(user);
    }

    public List<SystemUser> findUserListByRoleId(SystemRole role){
        return systemCustomDao.findUserListByRoleId(role);
    }

    public List<SystemUser> findUserListByNodeId(int nodeId){
        return systemCustomDao.findUserListByNodeId(nodeId);
    }

    public List<SystemUser> findUserListByName(String name){
        return systemCustomDao.findUserListByName(name);
    }
}
